<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let x={
      name:{
        xiao:"小王",
        da:"小张"
      },
      age:2
    }
    let y={
      ...x,
      sex:"男"
    }
    y.name.xiao="刘德华"
    console.log(x.name.xiao);

  </script>

</body>
</html>